Function: useLinkAddress()
useLinkAddress(
param
):MutationResult
<"linkAddress"
,LinkedAddress
,Error
,LinkAddress
>
Add address to profile.
When the address has been linked, the relevant profile query will be invalidated and re-fetched.
Parameters
• param
• param.mutation?: MutationOptions
<LinkedAddress
, Error
, LinkAddress
>
See Tanstack Query - useMutation options.
• param.profileId: string
Which profile to link the address.
Returns
MutationResult
<"linkAddress"
, LinkedAddress
, Error
, LinkAddress
>
Example
const {
linkAddress, // useMutation's `mutateAsync` property
isPending,
isError,
error,
status,
...moreUseMutationResults
} = useLinkAddress();